package wx.event.impl.subscribe;

import org.apache.commons.lang.StringUtils;
import wx.event.entity.weixing.WxEventRequest;
import wx.event.impl.core.BaseImpl;
import wx.event.impl.core.Process;
import wx.event.utils.ResponseUtil;

/**
 * 处理用户关注消息
 */
public class ProcessSubscribe extends BaseImpl implements Process {
    private WxEventRequest wxEventRequest;
    public ProcessSubscribe(WxEventRequest _wxEventRequest){
        this.wxEventRequest = _wxEventRequest;
    }
    @Override
    public String processEvent() {
        return ResponseUtil.respTextMessage(wxEventRequest, StringUtils.isEmpty(wxEventRequest.getEventKey())?"欢迎关注":"欢迎关注,二维码携带参数："+wxEventRequest.getEventKey());
    }
}
